package com.hecate.common.bid;

/**
 * @author 黄星星
 * @date 2020-12-09
 */
public class Bid {
    public Bid() {
    }

    public static String gen(String bid) {
        IBidGenerator generator = getInstance(GeneratorRuleEnum.common32);
        return generator.generateBid(bid);
    }

    private static IBidGenerator getInstance(GeneratorRuleEnum rule) {
        if (rule == GeneratorRuleEnum.common32) {
            return new Bid32Generator();
        } else {
            throw new UnsupportedOperationException("未支持其他方案");
        }
    }
}
